/**
 * 
 * 13/08/2013
 */

/**
 * Define System Clock, in Hertz. In two different ways.
 */
#define SYS_FREQ                (20000000ul)
#define	GetSystemClock()        (SYS_FREQ)
#define	GetPeripheralClock()    (GetSystemClock()/(1 << OSCCONbits.PBDIV))
#define	GetInstructionClock()	(GetSystemClock())

#define LED2	    LATDbits.LATD11
#define LED2_TRIS   TRISDbits.TRISD11
#define LED3	    LATAbits.LATA15
#define LED3_TRIS   TRISAbits.TRISA15
#define LED4	    LATAbits.LATA5
#define LED4_TRIS   TRISAbits.TRISA5

#define	MPU6050_DRDY	    PORTEbits.RE8
#define MPU6050_INT_TRIS    TRISEbits.TRISE8
#define HMC5983_DRDY	    PORTAbits.RA14
#define HMC5983_INT_TRIS    TRISAbits.TRISA14

/*
    LED2	VD	RD11
    LED3	AM	RA15
    LED4	AZ	RA5
    INT_I2C	MPU6050	INT1	RE8
    DRDY	HMC5983	INT3	RA14
 */